package gui;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;

public class StartView extends JPanel implements ActionListener {
	private JPanel buttonPanel;
	private JButton connect;
	private ImagePanel startPic;

	public StartView() {
		this.setLayout(new BorderLayout());
		//this.setPreferredSize(new Dimension(800,600));
		buttonPanel=new JPanel();
		buttonPanel.setVisible(true);
		startPic=new ImagePanel("startImage.jpg");
		this.add(startPic,BorderLayout.NORTH);
		this.setBackground(Color.BLACK);
		buttonPanel=new JPanel();
		connect=new JButton("Connect");
		connect.setPreferredSize(new Dimension(300,200));
		Font font=new Font(Font.SANS_SERIF,Font.BOLD,60);
		connect.setFont(font);
		buttonPanel.setLayout(new BorderLayout());
		buttonPanel.add(connect,BorderLayout.NORTH);
		this.add(buttonPanel, BorderLayout.CENTER);
		buttonPanel.setBackground(Color.BLACK);
		connect.addActionListener(this);
	}
	public void actionPerformed(ActionEvent e) {
		if (e.getActionCommand() == "Connect") {
			System.out.println("Connect pressed");
		} 
	}
}
